<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>数组练习1</title>
</head>
<body>

<!--
        1.将数组[12,34,2,5,76]中数字内容求和
-->
<script>

    var arr = [12, 34, 2, 5, 76]

    var sum = 0
    for (var i = 0; i < arr.length; i++) {
        sum += arr[i]
    }

    console.log("sum=" + sum);

</script>


</body>
</html>